﻿<%@ Page Title="Bewerk Facpercamp" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Facpercamp.aspx.cs" Inherits="WebApplication2.EditPages.Facpercamp" %>
<asp:Content runat="server" ID="FeaturedContent" ContentPlaceHolderID="FeaturedContent">
    <section class="featured">
        <div class="content-wrapper">
            <hgroup class="title">
                <h1><%: Title %>.</h1>
                <h2>Groep16 - Festivalinfo</h2>
            </hgroup>
            <p>
                Hier kan je de gegevens van de tabel Facpercamp bewerken.
            </p>
        </div>
    </section>
</asp:Content>
<asp:Content runat="server" ID="BodyContent" ContentPlaceHolderID="MainContent">

    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="camp_id,fac_id" DataSourceID="SqlDataSource1" AutoGenerateEditButton="True" AutoGenerateDeleteButton="True" OnRowEditing="GridView1_RowEditing" OnRowCancelingEdit="GridView1_RowCancelingEdit" OnRowUpdating="GridView1_RowUpdating" OnRowDeleting="GridView1_RowDeleting">
        <Columns>
            <asp:BoundField DataField="camp_id" HeaderText="campId" ReadOnly="True" SortExpression="camp_id" />
            <asp:BoundField DataField="fac_id" HeaderText="facId" ReadOnly="True" SortExpression="fac_id" />
            <asp:BoundField DataField="aantal" HeaderText="aantal" SortExpression="aantal" />
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:groep16_festivalsConnectionString %>" SelectCommand="SELECT * FROM [facpercamp]" DeleteCommand="DELETE FROM [facpercamp] WHERE [camp_id] = @camp_id AND [fac_id] = @fac_id" InsertCommand="INSERT INTO [facpercamp] ([camp_id], [fac_id], [aantal]) VALUES (@camp_id, @fac_id, @aantal)" UpdateCommand="UPDATE [facpercamp] SET [aantal] = @aantal WHERE [camp_id] = @camp_id AND [fac_id] = @fac_id">
        <DeleteParameters>
            <asp:Parameter Name="camp_id" Type="Int32" />
            <asp:Parameter Name="fac_id" Type="Int32" />
        </DeleteParameters>
        <InsertParameters>
            <asp:Parameter Name="camp_id" Type="Int32" />
            <asp:Parameter Name="fac_id" Type="Int32" />
            <asp:Parameter Name="aantal" Type="Int32" />
        </InsertParameters>
        <UpdateParameters>
            <asp:Parameter Name="aantal" Type="Int32" />
            <asp:Parameter Name="camp_id" Type="Int32" />
            <asp:Parameter Name="fac_id" Type="Int32" />
        </UpdateParameters>
    </asp:SqlDataSource>

</asp:Content>